﻿<%@ WebHandler Language="C#" Class="RegistrationHandler" %>


using System;
using System.Web;
using NOAH.CMS.Repository;
using System.Collections.Generic;
using System.Collections;
using System.Web.Security;
using Ext.Net;

public class RegistrationHandler : IHttpHandler
{

    public void ProcessRequest(HttpContext context)
    {
        context.Response.ContentType = "text/json";

        int start = 0;
        int limit = 0;
        int count = 0;

        List<RegistrationCourse> contact = new List<RegistrationCourse>();

        start = int.Parse(context.Request.QueryString["start"].ToString());
        limit = int.Parse(context.Request.QueryString["limit"].ToString());

        contact = new RegistrationRepository().GetAllRegistrationDetail(start, limit, out count);

        context.Response.Write(string.Format("{{total:{1},'data':{0}}}", JSON.Serialize(contact), count));
    }

    public bool IsReusable
    {
        get
        {
            return false;
        }
    }

}